<template>
    <div>
        <i-table border :columns="column" :data="dataAll"></i-table>
    </div>
</template>

<script>
export default {
  // 入/出库单详情
  name: "ins",
  data() {
    return {
      dataAll: [],
      column: [
          {
              title: '设备',
              key: 'name'
          },
                    {
              title: '数量',
              key: 'count'
          },
                    {
              title: '采购价',
              key: 'cost'
          },
                    {
              title: '售价',
              key: 'price'
          },
                              {
              title: '控制售价',
              key: 'control_price'
          },
          {
              title: '备注',
              key: 'remark'
          }
      ]
    };
  },
  computed: {
    busyId() {
      return this.$route.params.BusyId;
    }
  },
  methods: {
    getAll() {
      let data = {
        busyId: this.busyId
      };
      this.$api.getAllInsByBusyId(data).then(res => {
          if (!res.error) {
            this.dataAll = res.Data;
            // this.totals = res.Data.total;
          } else {
            this.$Message.error(res.message);
          }
          this.loading = false;
        });
    }
  },
  mounted () {
    this.getAll()
  }
};
</script>

<style scoped>

</style>